package com.zysoft.common.service;


import java.util.List;

import com.zysoft.common.entity.AbstractEntity;

public interface IBaseService<M extends AbstractEntity, PK extends java.io.Serializable> {
    
    public M save(M model);

    public void saveOrUpdate(M model);
    
    public void update(M model);
    
    public void merge(M model);

    public void delete(PK id);

    public void deleteObject(M model);

    public M get(PK id);
    
    public long countAll();
    
    public List<M> listAll();
    
//    public Page<M> pageAll(int pn);
    
//    public Page<M> pageAll(int pn, int pageSize);

    public M unique();
    
    public M unique(String where, Object... paramlist);

//    public List<M> pre(PK pk, int pn, int pageSize);

//    public List<M> pre(PK pk, int pn);

//   public List<M> next(PK pk, int pn, int pageSize);

//    public List<M> next(PK pk, int pn);   

}
